Monocular vision six-dimensional measurement method for high-dynamic large-range arbitrary contouring error of CNC machine tool

ABSTRACT

A monocular vision six-dimensional measurement method for high-dynamic large-range arbitrary contouring error of a CNC machine tool of the present invention belongs to the field of dynamic error detection of machine tools, and relates to a six-dimensional measurement method for high-dynamic large-range arbitrary contouring error of a CNC machine tool using a monocular vision measurement technology with short-time stroboscopic illumination and a priori standard plate. The method designs a measurement fixture and a measurement system, and uses a monocular vision pose algorithm to improve both the visual measurable dimension and range of interpolated contour in combination with priori knowledge. In light of the principle of error distribution, a small field of view is used to enhance the measurement accuracy of the coded primitives in the images. Then, by traversing all the acquired images using the proposed method, we can obtain the six-dimensional motion contour; and the six-dimensional contouring error caused by the imperfect machine interpolation can be computed by comparing the measured contour with the nominal one. The method enhances the measurable dimension of the vision technology through the monocular vision pose algorithm in combination with a datum transformation method, and realizes the six-dimensional measurement of large-range arbitrary contouring error of the CNC machine tool under the small field of view.

TECHNICAL FIELD

The present invention belongs to the field of dynamic error detection ofmachine tools, and relates to a six-dimensional measurement method forhigh-dynamic large-range arbitrary contouring error of a CNC machinetool using a monocular vision measurement technology with short-timestroboscopic illumination and a priori standard plate.

BACKGROUND

Variable-curvature parts with difficult-to-machine material such asmarine propellers, screw propellers for naval vessels, turbines andengine blades are widely used in major national equipment engineering.The shapes and geometrical profile accuracy of such parts directlyaffect the working performance of the equipment. Compared with thetraditional three-axis CNC machine tool, a multi-axis machine toolsolves the problem of one-time clamping and processing of most complexvariable-curvature parts by virtue of control performance at any timebetween a cutter and a work piece pose angle in the processing course.To achieve high quality and high efficiency machining, thehard-to-process variable-curvature parts are processed by the multi-axisCNC machine tool with special interpolation contour under high-dynamicconditions. However, in such high-traverse speed conditions, due to theprominent CNC machine tool error caused by insufficient dynamiccharacteristics of the machine tool, the relative position between thecutter and a work piece in the operation of the machine tool producesspace deviation and the processing quality of the work piece is reduced.A contouring error is an important index to evaluate the dynamicperformance of CNC machine tools. Therefore, the regular evaluation ofhigh-dynamic large-range arbitrary space contouring error (dynamicperformance) of the machine tool is an important guarantee to assess thedynamic performance of the CNC machine tool and improve the processingaccuracy.

The existing contouring error measurement methods of the CNC machinetool include a double ball-bar measurement method, a cross-grid encodermeasurement method, a R-test measurement method, a machine vision, etc.Chen jianxiong of Fuzhou University proposed detection andidentification method for four position independent errors and sixvolumetric errors of a rotary axis in “Geometric error measurement andidentification for rotary table of multi-axis machine tool using doubleball bar” published in “International Journal of Machine Tools &Manufacture” on Volume 77, Issue 77. A two-step method is used in theirresearch. According to the error identification model and the datameasured by the double ball-bar, four position independent errors andsix volumetric errors are separated using the identification algorithm.Although the double ball-bar equipment has high flexibility, thisone-dimensional measurement equipment can only measure contouring errorof a plane circle, while for contouring error of arbitrary path, it isunavailable. Furthermore, limited to the mechanical structure of themeasuring rod, the double ball-bar is very difficult to measure thecontouring error of a small-radius circle that can better reflect thedynamic performance of machine tools. Swiss scholars B. Bringmann et al.proposed a comprehensive method of using the spatial contour deviationmeasured by R-test to assist in identifying the errors both in a linearaxis and a rotary axis in “A method for direct evaluation of the dynamic3D path accuracy of NC machine tools” published in “CIRPAnnals-Manufacturing Technology” on Volume 58, Issue 1. Based on theproposed identification method, the motion deviation of the machine toolcan be reduced by setting acceleration and jerk parameters. R-test hashigh measurement accuracy, but also small measurement range.Unidirectional measurement ranges of X, Y and Z are less than 12 mm, andlinkage errors of irrelevant axes may be introduced during measurement.Soichi Ibaraki et al. of Kyoto University proposed an error measurementand identification method for machine tool installation and servosystems based on cross-grid encoder in “Diagnosis and compensation ofmotion errors in NC machine tools by arbitrary shape contouring errormeasurement” published in “Laser Metrology & Machine Performance V”. Theservo system is compensated with feedback signals of numerical controlposition to improve the contour interpolation accuracy of the machinetool. However, the equipment is cumbersome to operate and unable todetect motion error of a rotary axis.

A patent for invention CN 105798704 A “Monocular vision based method formeasuring plane contouring error of machine tools” applied by Liu Wei,Yan Hongyue et al. has invented a monocular vision method for contouringerror detection of a CNC machine tool. The patent for invention enhancesmeasurement efficiency, reduces cost and realizes two-dimensionalmeasurement of the plane interpolation contouring error of the CNCmachine tool. However, with this method, shooting frame frequency of thecamera is difficult to be improved due to the limited camera bandwidth,resulting the blurring effect of markers in the image taken at hightraverse speed of and the final vision solving accuracy of thecontouring error. Besides, this two-dimensional measurement methodcannot realize the three-dimensional computation of the contouring errorof CNC machine tools.

SUMMARY

The technical problem to be solved by the present invention is toovercome the defects in the prior art. For the problem that the existingsingle measurement method cannot realize the six-dimensional measurementof high-dynamic and large-range arbitrary contouring error of a CNCmachine tool, the present invention invents a monocular visionsix-dimensional method for measuring high-dynamic large-range arbitrarycontouring error of a CNC machine tool. A measurement fixture and ameasurement system are designed. In light of the principle of errordistribution, a small field of view is selected to enhance themeasurement accuracy of the visible coded primitives; in combinationwith priori knowledge, the monocular vision pose algorithm is used topromote vision measurable dimension and range of interpolationcontouring errors of machines; the whole machine tool motion contour isrepresented by a selected reference primitive; then, six-dimensionalinformation (X, Y, Z, pitch, roll and yaw) of the interpolated contourrepresented by the reference primitive in machine tool coordinate systemis obtained through datum transformation; the method is used to traverseeach shot frame image to obtain the final actual six-dimensional motioncontour of the machine tool; and a six-dimensional contouring errorgenerated by the CNC machine tool interpolation is computed by comparingthe measured contour with the nominal one. The measurement system of themethod has low cost and simple operation.

The present invention adopts the following technical solution: Amonocular vision six-dimensional measurement method for high-dynamiclarge-range arbitrary contouring error of a CNC machine tool ischaracterized in that the method designs a measurement fixture and ameasuring system, and in combination with priori knowledge, themonocular vision pose algorithm is used to promote vision measurabledimension and range of interpolation contouring errors of machines; thewhole machine tool motion contour is represented by a selected referenceprimitive; a small field of view is used to enhance the measurementaccuracy of the visible coded primitives; then, six-dimensionalinformation (X, Y, Z, pitch, roll and yaw) of the machine toolinterpolation contour represented by the reference primitive in machinetool coordinate system is obtained through datum transformation; themethod is used to traverse each shot frame image to obtain the finalactual six-dimensional motion contour of the machine tool; asix-dimensional contouring error generated by the CNC machine toolinterpolation is computed by comparing the measured contour with thenominal one; specific steps of the method are as follows:

-   -   first step: installing the measurement fixture and the        measurement system    -   the measurement fixture is composed of a base 10, a        high-brightness short-time light-emitting unit 9, a priori        standard plate 7 and coded primitives 8; the priori standard        plate 7 is made of transparent base material, and the coded        primitives 8 with unique code values and matrice distribution        are coated on the priori standard plate 7; when the measurement        fixture is installed, the high-brightness short-time        light-emitting unit 9 is fixed to grooves on both sides of the        base 10; the priori standard plate 7 is supported on the base        10; the priori standard plate 7 is pressed by two pressing        plates 6; four pressing plate locking bolts 5 are used to press        and fix the priori standard plate 7 through the pressing plates        6;    -   the measurement system comprises a camera 1, a camera clamp 2        and the measurement fixture; the camera 1 is fixed to the camera        clamp 2; the camera clamp 2 is installed above the measurement        fixture to collect sequential images in the motion process of        the measurement fixture; the assembled measurement fixture is        put on an optical three-coordinate device platform; an optical        three-coordinate device calibrates a space geometry relation        among the coded primitives 8 under a global coordinate system of        the priori standard plate; when the measurement system is        arranged, the calibrated measurement fixture is fastened to a        rotary table 3 of the CNC machine tool 4 through a pressing bolt        11 and a pressing nut 12;    -   second step: establishing the global coordinate system of the        priori standard plate    -   the global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the        priori standard plate is established on the measurement fixture;        an origin is established on the center of the coded primitive 8        in the first row and the first column, and is defined as O_(G);        the direction of the X_(G) coordinate axis is that the origin        O_(G) downwards points to the center point of the coded        primitive 8 in the first column and the last row on the array;        the direction of the Y_(G) coordinate axis is that the O_(G)        points towards the right to the center point of the coded        primitive 8 in the first row and the last column on the array;        the Z_(G) coordinate axis is determined by a right-handed rule;        the optical three-coordinate device is used to calibrate the        space geometry relation among the coded primitives 8 under the        global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the priori        standard plate to obtain three-dimensional coordinates of the        coded primitives 8 under the global coordinate system        O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate; the coded        primitives 8 on the priori standard plate 7 carry motion        information of the CNC machine tool 4; the spatial position        relationship among the coded primitives 8 is calibrated through        a high-accuracy device; on the premise of ensuring calibration        accuracy, the size of the priori standard plate 7 can be made as        large as possible to satisfy large-scale measurement demands of        the contouring error;    -   third step: camera calibration    -   a camera imaging model expresses a one-to-one mapping        relationship between a camera coordinate system and a world        coordinate system; the camera imaging model with distortion        parameters is:

$\begin{matrix}{{Z_{c}\begin{bmatrix}{u + \delta_{x}} \\{v + \delta_{y}} \\1\end{bmatrix}} = {{{\begin{bmatrix}C_{x} & 0 & u_{0} \\0 & C_{y} & v_{0} \\0 & 0 & 1\end{bmatrix}\begin{bmatrix}R_{C}^{I} & T_{C}^{I} \\0^{T} & 1\end{bmatrix}}\begin{bmatrix}X_{w} \\Y_{w} \\Z_{w} \\1\end{bmatrix}} = {K \cdot T \cdot \begin{bmatrix}X_{w} \\Y_{w} \\Z_{w} \\1\end{bmatrix}}}} & (1)\end{matrix}$

-   -   where (X_(w),Y_(w),Z_(w)) is a three-dimensional coordinate of        the center point of the coded primitive 8 under the world        coordinate system; K is an intrinsic matrix of the camera 1; T        is an extrinsic matrix of the camera 1; (u,v) is a        two-dimensional coordinate of the center point of the coded        primitive 8 in an image plane; (u₀,v₀) is coordinate of the        principal point; (C_(x),C_(y)) is an equivalent focal length in        transverse and longitudinal direction; R_(C) ^(I) and T_(C) ^(I)        are respectively rotation and translation transformation        matrixes between the camera coordinate system and the world        coordinate system; (δ_(x),δ_(y)) is a distortion of an image        point in the directions of x and y caused by an imperfect        optical system; checker calibration board is placed in multiple        positions in the field of view 21 of the camera 1 and the images        is acquired; distortion parameters as well as the intrinsic and        extrinsic matrixes of the camera 1 are calibrated through a        calibration algorithm proposed by Zhengyou Zhang, “A flexible        new technique for camera calibration,” in IEEE Transactions on        Pattern Analysis and Machine Intelligence, vol. 22, no. 11, pp.        1330-1334, November 2000, doi: 10.1109/34.888718 (Year: 2000).    -   fourth step: high-definition no-fuzzy image collection and        processing for high-dynamic and large-range interpolation        contour of CNC machine tool    -   on the basis of completing the installation and arrangement of        the measurement fixture, images of the contour interpolated by        the CNC machine tool 4 are collected; because requirements for        the measurement accuracy of the contouring error are high, the        required field of view 21 for shooting is small; firstly, the        parameters of the camera 1 are adjusted so that the camera 1 is        under the optimal shooting field of view and frame frequency;        subsequently, the camera 1 and the high-brightness short-time        light-emitting unit 9 are synchronously triggered;        light-emitting time and light-emitting intensity of the        high-brightness short-time light-emitting unit 9 are set to        ensure that the high-brightness short-time light-emitting unit 9        penetrates through the base of the priori standard plate 7        within the exposing time of the camera 1 and supplements light        for the coded primitives 8; high-traverse speed machine tool        speed which can reflect dynamic performance of the machine tool        is selected; each motion axis of the CNC machine tool 4 is        driven to interpolate the contour in accordance with the program        instructions; in the process of image collection of the machine        tool movement, the camera 1 is fixed and the machine tool moves;        clear and no-fuzzy sequential images of the coded primitives 8        are collected under the assistance of the high-brightness        short-time light-emitting unit 9;    -   after the images are collected, the code values represented by        each coded primitive 8 on the images are recognized, then the        two-dimensional pixel coordinates of the center point of each        coded primitive 8 which is decoded is positioned through a gray        centroid method; the center of coded primitives is positioned by        an extraction algorithm of the gray centroid method, with a        computation expression as follows:

$\begin{matrix}\left\{ \begin{matrix}{x = \frac{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{i \times {f\left( {i,j} \right)}}}}{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{f\left( {i,j} \right)}}}} \\{y = \frac{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{j \times {f\left( {i,j} \right)}}}}{\overset{m}{\sum\limits_{i = 1}}{\sum\limits_{j = 1}^{n}{i \times {f\left( {i,j} \right)}}}}}\end{matrix} \right. & (2)\end{matrix}$

-   -   where (i, j) represents the pixel point in image plane; m and n        are the number of pixels included in the image in the transverse        direction and the longitudinal direction; (x, y) is a        center-of-mass coordinate of the image; f(i, j) is a gray value        at the pixel coordinate (i, j);    -   fifth step: six-dimensional computation for high-dynamic and        large-range arbitrary contouring error of CNC machine tool    -   in the method, a small field of view 21 is used to enhance the        measurement accuracy of the coded primitives 8 in the field of        view; in combination with priori knowledge, the monocular vision        pose algorithm is used to promote vision measurable dimension        and range of interpolation contouring errors of machines; the        whole machine tool motion contour is represented by a selected        reference primitive; the position of the reference primitive in        an invisible region of the field of view 21 is computed by the        pixel coordinates of the primitives in visible region in        combination with high-accuracy priori constraints; the motion        contour represented by the reference primitive in machine tool        coordinate system is obtained through datum transformation by        traversing all the images; a six-dimensional contouring error        generated by the interpolation of the CNC machine tool 4 is        computed by comparing the measured contour with the nominal one;        six-dimensional computation steps for high-dynamic and        large-range arbitrary contouring error of CNC machine tool are        specifically as follows:    -   the field of view 21 of the camera 1 is N×N (unit: mm); the        external dimension of the priori standard plate 7 is M×M (unit:        mm); N is much smaller than M; besides the above global        coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard        plate, involved coordinate systems also comprise a camera        coordinate system O_(C)X_(C)Y_(C)Z_(C) 13, a machine tool        coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 and a local coordinate        system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori standard plate;        the origin of the camera coordinate system O_(C)X_(C)Y_(C)Z_(C)        13 is established on an optical center O_(C); when the CNC        machine tool 4 does not move, four coded primitives P₁ ¹ 16, P₁        ² 17, P₁ ³ 18 and P₁ ⁴ 19 arranged in a rectangle in the field        of view are selected in the first frame image; the coded        primitive P₁ ¹ 16 is selected as the reference primitive; the        motion contour of the CNC machine tool 4 synthesized by the        interpolation motion axis of each axis is represented by the        coded primitive P₁ ¹ 16; the coordinate in the global coordinate        system O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate is        ^(G)P₁ ¹(^(G)X₁ ¹, ^(G)Y₁ ¹, ^(G)Z₁ ¹); the machine tool        coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 is established by        taking P₁ ¹ 16 as an origin; the direction of each coordinate        axis of the machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M)        15 is consistent with the direction of each motion axis of the        CNC machine tool 4; the machine tool is controlled to drive the        measurement fixture to respectively move along the X axis        direction of the machine tool to multiple positions; the        three-dimensional coordinate (x,y,z) of P₁ ¹ 16 relative to the        camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 in each        position is computed using a monocular vision pose solving        algorithm; on this basis, a vector in the X axis direction is        fitted; the Y axis of the machine tool coordinate system        O_(M)X_(M)Y_(M)Z_(M) 15 is determined in accordance with the        same rule; the Z axis of the machine tool coordinate system        O_(M)X_(M)Y_(M)Z_(M) 15 is determined by the right-handed rule;        X axis and Y axis are established in accordance with the        following formula:

$\begin{matrix}\left\{ \begin{matrix}{\frac{x - {{}_{}^{}{}_{}^{}}}{m_{x}} = {\frac{y - {{}_{}^{}{}_{}^{}}}{n_{x}} = \frac{z - {{}_{}^{}{}_{}^{}}}{p_{x}}}} \\{\frac{x^{\prime} - {{}_{}^{}{}_{}^{}}}{m_{y}} = {\frac{y^{\prime} - {{}_{}^{}{}_{}^{}}}{n_{y}} = \frac{z^{\prime} - {{}_{}^{}{}_{}^{}}}{p_{y}}}} \\{\begin{pmatrix}{\,^{M}X} \\{\,^{M}Y} \\{\,^{M}Z} \\1\end{pmatrix} = {M_{C}^{M}\begin{pmatrix}{\,^{C}X} \\{\,^{C}Y} \\{\,^{C}Z} \\1\end{pmatrix}}}\end{matrix} \right. & (3)\end{matrix}$

where ^(C)P₁ ¹(^(C)X₁ ¹, ^(C)Y₁ ¹, ^(C)Z₁ ¹), is the three-dimensionalcoordinates of the coded primitive P₁ ¹ 16 in the camera coordinatesystem O_(C)X_(C)Y_(C)Z_(C) 13 in the first frame image; (x′,y′,z′) isthe three-dimensional coordinates of point P₁ ¹ 16 relative to thecamera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 in each positioncomputed using the monocular vision pose solving algorithm by themeasurement fixture that moves along the X axis direction of the machinetool to multiple positions; (m_(x),n_(x),p_(x)) is a vector in the Xaxis direction of the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) 15; (m_(y),n_(y),p_(y)) is a vector in the Y axisdirection of the machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15;(^(C)X, ^(C)Y, ^(C)Z) is a three-dimensional coordinates of a point inthe camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13; (^(M)X, ^(M)Y,^(M)Z) is a three-dimensional coordinates of a point in the machine toolcoordinate system O_(M)X_(M)Y_(M)Z_(M) 15; M_(C) ^(M) is atransformation matrix between the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) 13 and the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) 15;

during measurement, the priori standard plate 7 continuously makesinterpolation motion along with the machine tool, and the codedprimitives 8 thereon are continuously imaged on the camera 1; in themotion process of the CNC machine tool 4, the camera 1 collects G frameimages totally; four coded primitives 8 that appears in the field ofview in the ith frame image and arranged in a rectangle are P_(i) ¹ 23,P_(i) ² 24, P_(i) ³ 25 and P_(i) ⁴ 26; the coordinates of the centers ofthe four coded primitives 8 in the global coordinate systemO_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate are ^(G)P_(i)¹(^(G)X_(i) ¹, ^(G)Y_(i) ¹, ^(G)Z_(i) ¹), ^(G)P_(i) ²(^(G)X_(i) ²,^(G)Y_(i) ², ^(G)Z_(i) ²), ^(G)P_(i) ³(^(G)X_(i) ³, ^(G)Y_(i) ³,^(G)Z_(i) ³) and ^(G)P_(i) ⁴(^(G)X_(i) ⁴, ^(G)Y_(i) ⁴, ^(G)Z_(i) ⁴);corresponding two-dimensional pixel coordinates on the image plane arep_(i) ¹(u_(i) ¹,v_(i) ¹), p_(i) ²(u_(i) ²,v_(i) ²), p_(i) ³(u_(i)³,v_(i) ³) and p_(i) ⁴(u_(i) ⁴,v_(i) ⁴); a local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) 22, (i=1, 2 . . . G) of the priori standardplate under the ith frame is established; the coordinate system takesP_(i) ¹ 23 as a coordinate origin; X_(Li) and Y_(Li) coordinate axisdirections are respectively parallel to X_(G) and Y_(G) directions ofthe global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the prioristandard plate; Z_(Li) coordinate axis is determined by the right-handedrule; three-dimensional coordinates of the centers of the selected fourcoded primitives 8 in the local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori standard plate are:

$\begin{matrix}\left\{ \begin{matrix}{{\begin{pmatrix}{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\1\end{pmatrix} = {{\begin{pmatrix}I & T_{i}^{T} \\0 & 1\end{pmatrix}\begin{pmatrix}{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\1\end{pmatrix}m} = 1}},2,3,4} \\{T_{i} = \left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)}\end{matrix} \right. & (4)\end{matrix}$

where T_(i) is a transformation matrix between the global coordinatesystem O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate of the ithframe image and the local coordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) 22of the priori standard plate; the ith frame image i=1, 2 . . . G iscomputed as follows:

$\begin{matrix}\left\{ \begin{matrix}{{Y_{i}^{2} + Z_{i}^{2} - {2Y_{i}Z_{i}\;\cos\;\alpha}} = \alpha^{\prime 2}} \\{{X_{i}^{2} + Z_{i}^{2} - {2X_{i}Z_{i}\cos\;\beta}} = b^{\prime 2}} \\{{X_{i}^{2} + Y_{i}^{2} - {2X_{i}Y_{i}\cos\;\gamma}} = c^{\prime 2}}\end{matrix} \right. & (5)\end{matrix}$

where X_(i) is a distance from the optical center O_(C) in the cameracoordinate system O_(C)X_(C)Y_(C)Z_(C) 13 to the P_(i) ¹ 23 point on thepriori standard plate 7 of the ith frame; Y_(i) is a distance from theoptical center O_(C) in the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) 13 to the P_(i) ² 24 point on the priori standardplate 7 of the ith frame; Z_(i) is a distance from the optical centerO_(C) in the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 to theP_(i) ⁴ 26 point on the priori standard plate 7 of the ith frame; a′ isa distance between P_(i) ¹ 23 and P_(i) ² 24 in the global coordinatesystem O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate 7 of the ithframe; b′ is a distance between P_(i) ² 24 and P_(i) ⁴ 26 in the globalcoordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plateof the ith frame; c′ is a distance between P_(i) ¹ 23 and P_(i) ²⁶ inthe global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the prioristandard plate of the ith frame; α is an angle ∠P_(i) ²O_(C)P_(i) ⁴between straight lines O_(C)P_(i) ² and O_(C)P_(i) ⁴; β is an angle∠P_(i) ¹O_(C)P_(i) ⁴ between straight lines O_(C)P_(i) ¹ and O_(C)P_(i)⁴; γ is an angle ∠P_(i) ¹O_(C)P_(i) ² between straight lines O_(C)P_(i)¹ and O_(C)P_(i) ²;

${{\cos\;\alpha} = {{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)^{2}}}},{{\cos\;\gamma} = {{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)^{2}}}},{{{\cos\;\beta} = {{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)^{2}}}};}$

k=2 cos α, q=2 cos β, r=2 cos γ, c′²=vZ_(i) ², a′²=ac′²=avZ_(i) ²,b′²=bc′²=bvZ², Y_(i) bZ_(i), P_(i) ¹ 23, P_(i) ² 24 and P_(i) ⁴ 26 areset as three spatial points in the ith frame that are not coplanar andwhose position relation is known, and k²+q²+r²−kgr−1≠0 is satisfied;equation (5) may be rewritten as formula (6);

$\begin{matrix}\left\{ \begin{matrix}{{{\left( {1 - a} \right)y^{2}} - {ax}^{2} + {axyr} - {yk} + 1} = 0} \\{{{\left( {1 - b} \right)x^{2}} - {by}^{2} + {bxyr} - {xq} + 1} = 0}\end{matrix} \right. & (6)\end{matrix}$

the degenerate solution of the formula (6) is eliminated through anoptimization algorithm to obtain four acceptable zero solutions; P_(i) ³25 is used as a priori constraint to obtain unique solutions of X_(i),Y_(i) and Z_(i); then three-dimensional coordinates ^(C)P_(i)¹(^(C)X_(i) ¹, ^(C)Y_(i) ¹, ^(C)Z_(i) ¹), ^(C)P_(i) ²(^(C)X_(i) ²,^(C)Y_(i) ², ^(C)Z_(i) ²) and ^(C)P_(i) ⁴(^(C)X_(i) ⁴, ^(C)Y_(i) ⁴,^(C)Z_(i) ⁴) of P_(i) ¹ 23, P_(i) ² 24 and P_(i) ⁴ 26 points on thepriori standard plate 7 of the ith frame under the camera coordinatesystem O_(C)X_(C)Y_(C)Z_(C) 13 are expressed as the following formula:

$\begin{matrix}\left\{ \begin{matrix}{{{}_{}^{}{}_{}^{}} = {\frac{u_{i}^{1}}{C_{x}} \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}} \\{{{}_{}^{}{}_{}^{}} = {\frac{v_{i}^{1}}{C_{y}} \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}} \\{{{}_{}^{}{}_{}^{}} = {1 \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}}\end{matrix} \right. & (7) \\{{j = 1},2,{4;{i = 1}},{{2\mspace{14mu}\ldots\mspace{14mu} G};}} & \;\end{matrix}$

-   -   on the basis of the known ^(Li)P_(i) ^(j)(^(Li)X_(i) ^(j),        ^(Li)Y_(i) ^(j), ^(Li)Z_(i) ^(j)) and ^(C)P_(i) ^(j)(^(C)X_(i)        ^(j), ^(C)Y_(i) ^(j), ^(C)Z_(i) ^(j), a Kabsch algorithm is used        for solving a rotation matrix R_(i)′ and a translation matrix t;        of the local coordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of        the priori standard plate of the ith frame relative to the        camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13; t_(i)′; is the        three-dimensional coordinates t₁′=^(C)P_(i) ¹(^(C)X_(i) ¹,        ^(C)Y_(i) ¹, ^(C)Z_(i) ¹) of the origin P_(i) ¹ 23 of the local        coordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori        standard plate of the ith frame in the camera coordinate system        O_(C)X_(C)Y_(C)Z_(C) 13; a pitch angle θ_(i)′, a roll angle        Φ_(i)′ and a yaw angle ψ_(i)′ between two coordinate systems are        computed through R_(i)′ separation; the three-dimensional        coordinates

(, , );$\left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)^{T} = {\begin{pmatrix}R_{i}^{\prime} & t_{i}^{\prime\; T} \\0 & 1\end{pmatrix}\begin{pmatrix}I & T_{i}^{T} \\0 & 1\end{pmatrix}\left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)^{T}}$of the reference primitive P₁ ¹ in the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) 13 of the ith frame is computed according to aknown spatial constraint among the coded primitives 8 of the prioristandard plate 7;

-   -   the measured contouring error is represented in the machine tool        coordinate system O_(M)X_(M)Y_(M)Z_(M) 15, and the contour        measured by the camera 1 needs to be subjected to coordinate        transformation to correctly compute the machine tool contouring        error; a pose transformation formula of the machine tool        coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 and the local        coordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori        standard plate is:

$\begin{matrix}{{M_{i} = {M_{C}^{M}\begin{pmatrix}R_{i}^{\prime} & t_{i}^{\prime\; T} \\0 & 1\end{pmatrix}}},} & (8)\end{matrix}$

-   -   where M, is a transformation matrix between the local coordinate        system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori standard plate        under the ith frame image and the machine tool coordinate system        O_(M)X_(M)Y_(M)Z_(M) 15; a pitch angle θ_(i), a roll angle Φ_(i)        and a yaw angle ψ_(i) of the ith frame standard plate relative        to the machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15        are separated from M_(i); all image sequences are traversed to        obtain a six-degree-of-freedom contour L_(r) of the whole        machine tool represented by the reference primitive, where        L_(r)(^(M)X_(i), ^(M)Y_(i), ^(M)Z_(i), θ_(i), Φ_(i), ψ_(i)) and        i=1, 2 . . . G; a six-degree-of-freedom contouring error E        generated by interpolation of the CNC machine tool 4 is computed        by comparing the actual six-degree-of-freedom contour L_(r) with        the nominal contour L_(m):        E=L _(r) −L _(m).  (9)

Compared with the existing vision method, the present invention has thebeneficial effects of enhancing vision measurable interpolation speed ofthe CNC machine tool, breaking through measurable speed limit of themachine tool and extending vision measurable interpolation traversespeed range of the CNC machine tool. Furthermore, to ensure measurementaccuracy of the contouring error, the field of view is less. The presentinvention uses a vision pose algorithm to realize six-dimensionalmeasurement for large-range arbitrary contouring error of the CNCmachine tool under small field of view in combination with priorispatial constraints among the coded primitives on the large-sizestandard plate, and extends measurable motion range and measurementdimension of the vision system. In the measurement process, only asingle camera, a specially-made measurement fixture and a specially-mademeasurement system are adopted, so that operation simplicity is enhancedwhile the cost is reduced.

DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram of a six-dimensional measurement system forhigh-dynamic large-range arbitrary contouring error of a CNC machinetool. In the figure, 1—camera; 2—camera clamp; 3—rotary table; and 4—CNCmachine tool.

FIG. 2 is an exploded view of a measurement fixture. In the figure,5—pressing plate locking bolt; 6—pressing plate; 7—priori standardplate; 8—coded primitive; 9—high-brightness short-time light-emittingunit; 10—base; 11—pressing bolt; and 12—pressing nut.

FIG. 3 is an arrangement diagram of a measurement system and eachcoordinate system when a machine tool does not move. In the figure,13—camera coordinate system O_(C)X_(C)Y_(C)Z_(C); 14—global coordinatesystem O_(G)X_(G)Y_(G)Z_(G) of priori standard plate; 15—machine toolcoordinate system O_(M)X_(M)Y_(M)Z_(M); 16—coded primitive P₁ ¹;17—coded primitive 18—coded primitive P₁ ³; 19—coded primitive P₁ ⁴;20—local coordinate system O_(L1)X_(L1)Y_(L1)Z_(L1) of priori standardplate of first frame; and 21—field of view of camera.

FIG. 4 shows an identification and positioning result of a codedprimitive of the 300th frame image.

FIG. 5 shows the X component of the machine tool interpolated contouringerror solved by the vision method.

FIG. 6 shows the Y component of the machine tool interpolated contouringerror solved by the vision method.

FIG. 7 shows the Z component of the machine tool interpolated contouringerror solved by the vision method.

FIG. 8 shows the pitch component θ_(i) of the machine tool interpolatedcontouring error solved by the vision method.

FIG. 9 shows the roll component Φ_(i) of the machine tool interpolatedcontouring error solved by the vision method.

FIG. 10 shows the yaw component ψ_(i) of the machine tool interpolatedcontouring error solved by the vision method.

DETAILED DESCRIPTION

Specific embodiments of the present invention are described below indetail in combination with the technical solution and accompanyingdrawings.

To reflect the arbitrariness of the path, a plane interpolationequiangular spiral contour of a CNC machine tool is taken as a researchobject, and the six-dimensional contouring error is solved using thevision detection method of the present invention. The equation of theequiangular spiral contour to be measured is r=0.189 e^(0.221θ),θ[0,7.3π]. Six-dimensional solving steps of the equiangular spiralcontouring error are specifically as follows:

First Step: Designing and Installing a Measurement Fixture and aMeasurement System

As shown in FIG. 1, a measurement object is a self-designed CNC machinetool 4. The strokes of the CNC machine tool 4 in X direction and Ydirection are respectively 800 mm and 900 mm. To reflect the dynamicperformance of the machine tool, the interpolation speed of the machinetool is selected as 3 m/min. The measurement system comprises a camera1, a camera clamp 2 and the measurement fixture. In the embodiment, theselected camera 1 has a frame frequency of 60 fps, a resolution of3300×3300 pixels and an exposing time of 5000 μs. The camera clamp 2 canrealize six-pose adjustment of the camera 1. The measurement fixture iscomposed of a base 10, a high-brightness short-time light-emitting unit9, a priori standard plate 7 and coded primitives 8. The measurementfixture is installed on a rotary table of the CNC machine tool.

FIG. 2 is an exploded view of the measurement fixture. The prioristandard plate 7 is made of transparent glass material having anexternal dimension of 250 mm×250 mm, and 196 coded primitives 8distributed in a matrix are photoetched on the priori standard plate 7.Each coded primitive 8 is sampled and valued from [65, 637], and hasunique code value. The center distance between adjacent coded primitives8 is 16 mm.

Each unit is assembled in accordance with the exploded view of themeasurement fixture shown in FIG. 2. The specific assembling sequenceis: the high-brightness short-time light-emitting unit 9 is insertedinto grooves on both sides of the base 10; the priori standard plate 7is put on the base 10; the priori standard plate 7 is pressed by twopressing plates 6; and four pressing plate locking bolts 5 are used topress and fix the priori standard plate 7 through the pressing plates 6.

The assembled measurement fixture is put on an optical three-coordinatedevice platform; and a global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14of the priori standard plate is established, as shown in FIG. 3. Theoptical three-coordinate device is used to calibrate the space geometryrelation among the coded primitives 8 in the global coordinate systemO_(G)X_(G)Y_(G)Z_(G) 14 of the priori standard plate; the measurementand detection accuracy of an optical three-coordinate space is 0.5 μm;and three-dimensional coordinates of the coded primitives 8 in theglobal coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the priori standardplate are obtained.

The calibrated measurement fixture is fastened to a rotary table of theCNC machine tool 4 through a pressing bolt 11 and a pressing nut 12. Ininstallation, the camera 1 is fixed to the camera clamp 2; andsix-dimensional pose parameters of the camera 1 are adjusted to ensurethat the camera clamp 2 is positioned above the measurement fixture tocollect sequential images of the coded primitives 8 in the motionprocess of the measurement fixture. Imaging parameters of the camera 1are adjusted. The field of view 21 of the camera 1 is 40 mm×40 mm, andthe measurement distance is about 337 mm.

Second Step: Camera Calibration

High-accuracy two-dimensional checker calibration board are placed in 16positions in the field of view 21 of the camera 1; and the camera 1 istriggered in each position to shoot the images of the calibrationboards. Intrinsic and extrinsic parameters and distortion parameters ofthe camera 1 are calibrated through a calibration algorithm proposed byZhengyou Zhang, “A flexible new technique for camera calibration,” inIEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22,no. 11, pp. 1330-1334, November 2000, doi: 10.1109/34.888718 (Year:2000) in combination with the formula (1). The equivalent focal lengthof the calibrated transverse direction and longitudinal direction is:(α_(x), α_(y))=(14959.25, 14959.68); the principal point of the image is(u₀, v₀)=(2557.11, 2599.79); five distortion factors to be solved forexpressing distortion are (0.10328, −0.23054, 0.00045, 0.00012, 0).

Third step: high-definition no-fuzzy image collection and processing forhigh-dynamic and large-range interpolation contour of CNC machine tool

Image sequence of the plane equiangular spiral contour interpolated bythe CNC machine tool 4 is collected and processed. The camera 1 and thehigh-brightness short-time light-emitting unit 9 are synchronouslytriggered, then the X axis and Y axis of the CNC machine tool 4 aredriven to interpolate the contour; and the light-emitting time of thehigh-brightness short-time light-emitting unit 9 in each frame is set as700 μs to ensure high contrast of the collected sequential images. Afterthe images are collected, the code value of the coded primitive 8 ineach frame image is identified, and the pixel coordinates of the centerpoint of each coded primitive 8 is positioned through a gray centroidmethod in combination with the formula (2). FIG. 4 shows a processingresult of image identification and positioning of a coded primitive 8.

Fourth step: six-dimensional computation for high-dynamic andlarge-range arbitrary contouring error of CNC machine tool

The field of view 21 of the adopted camera 1 is 40 mm×40 mm; theexternal dimension of the priori standard plate 7 is 250 mm×250 mm; thescope of the measured equiangular spiral contour is [90 mm, 70 mm]; andthe field of view 21 of the camera 1 is less than the range of thecontour interpolated by the machine tool. The whole machine tool motioncontour is represented by a coded primitive 8 selected on the firstframe image. The position of this primitive in an invisible region isestimated through a space geometry relation among the coded primitives 8on the large-size priori standard plate 7, so as to realize large-rangecontouring error measurement of the CNC machine tool 4. Specific stepsare as follows:

Step 1 The camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 isestablished with reference to FIG. 3; the coded primitive P₁ ¹ 16 with acode value of 235 in the sixth row and the ninth column on the prioristandard plate is selected from the first image frame as a referenceprimitive; the coded primitive 8 with a code value of 237 in the sixthrow and the tenth column is selected as a second coded primitive P₁ ²17; the coded primitive 8 with a code value of 285 in the seventh rowand the tenth column is selected as a third coded primitive P₁ ³ 18; thecoded primitive 8 with a code value of 283 in the seventh row and theninth column is selected as a fourth coded primitive P₁ ⁴ 19; the codedprimitive P₁ ¹ 16 with a code value of 235 is selected as an origin, soas to establish a local coordinate system O_(L1)X_(L1)Y_(L1)Z_(L1) 20and a machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 of thefirst frame priori standard plate; and a transformational relationbetween the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 and themachine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 is establishedaccording to the formula (3), as follows:

$M_{C}^{M} = {\begin{bmatrix}{- 1} & {- 0.0024} & 0.0035 & 0.243252 \\0.0024 & {- 1.0000} & {- 0.0001} & {- 0.682648} \\0.0035 & {- 0.0001} & 1.0000 & {- 337.653} \\0 & 0 & 0 & 1\end{bmatrix}.}$

Step 2 The camera 1 shoots 500 images in the whole contour measurementprocess; the embodiment analyzes and shoots the 300th frame image; thecoded primitive on the ninth row and the eighth column is selected as afirst coded primitive P₃₀₀ ¹ 22 selected by the 300th frame; the codedprimitive on the ninth row and the ninth column is selected as a secondcoded primitive L₃₀₀ ² 23 of the 300th frame; the coded primitive in thetenth row and the ninth column is selected as a third coded primitiveP₃₀₀ ³ 24 of the 300th frame; and the coded primitive in the tenth rowand the eighth column is selected as a fourth coded primitive P₃₀₀ ⁴ 25of the 300th frame. The local coordinate systemO_(L300)-X_(L300)Y_(L300)Z_(L300) 21 of the priori standard plate underthe 300th frame is established. The coordinates of four points in theglobal coordinate system O_(G)-X_(G)Y_(G)Z_(G) 14 of the priori standardplate are respectively (112.0010, 128.0024, 0.0110), (127.9990,128.0021, 0.0111), (128.0012, 144.0037, 0.0120) and (112.0008, 144.0057,0.0146). The coordinates of four points in the local coordinate systemO_(L300)-X_(L300)Y_(L300)Z_(L300) 21 of the priori standard plate arecomputed through the formula (5): (0, 0, 0), (15.9980, −0.0030,−0.0010), (16.0003, 16.0013, 0.0010) and (−0.0002, 16.0033, 0.0036). Thepixel coordinates on the image plane of the camera 1 are (1452.39,1071.15), (2497.23, 683.88), (2884.75, 1729.45) and (1839.66, 2116.14).^(C)X₃₀₀, ^(C)Y₃₀₀, ^(C)Z₃₀₀, pitch angle θ₃₀₀′, roll angle Φ₃₀₀′ andyaw angle ψ₃₀₀′ of the priori standard plate 7 of the 300th frame imageunder the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 are computedaccording to formulas 5-7. Computation results are: (−10.9098 mm,−3.08975 mm, 337.696, −179.931°, 0.19436°), −0.00356046°.

Step 3 The six-dimensional information of ^(M)X₃₀₀, ^(M)Y₃₀₀, ^(M)Z₃₀₀,pitch angle θ₃₀₀, roll angle Φ₃₀₀ and yaw angle ψ₃₀₀ of the 300th frameimage in the machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15 iscomputed as (12.3424, 2.3471, −0.051, −0.211°, 0.056°, −0.002°.

Step 4 Each shot frame image is traversed in accordance with the abovemethod to obtain the final interpolation contour in the machine toolcoordinate system O_(M)X_(M)Y_(M)Z_(M) 15 represented by the codedprimitive 8 with a code value of 235; and the six-degree-of-freedomcontouring error of the path interpolated by the CNC machine tool 4 issolved by comparing the actual six-degree-of-freedom contour L_(r) withthe nominal contour L_(m). FIG. 5, FIG. 6 and FIG. 7 respectively showX, Y and Z components of the machine tool interpolated contouring errorsolved by the vision method. FIG. 8, FIG. 9 and FIG. 10 respectivelyshow pith, roll and yaw components of the machine tool interpolatedcontouring error solved by the vision method. It can be clearly seenfrom the figures that, the method can be used to conveniently solve acontouring error of the path interpolated by the machine tool.

The method uses a monocular vision pose algorithm to realizesix-dimensional measurement for large-range arbitrary contouring errorof the CNC machine tool under small field of view in combination withpriori spatial constraints among the coded primitives on the large-sizestandard plate, and extends measurable motion range and measurementdimension of the vision system. The measurement system and method of thepresent invention have low cost and simple operation.

We claim:
 1. A monocular vision six-dimensional measurement method forhigh-dynamic large-range arbitrary contouring error of computernumerical control (CNC) machine tool, characterized in that the methoduses a measurement fixture and a measuring system which are speciallydesigned, and in combination with priori knowledge, the monocular visionpose algorithm is used to promote vision measurable dimension and rangeof interpolation contouring errors of machines; the whole machine toolmotion contour is represented by a selected reference primitive; a smallfield of view is used to enhance the measurement accuracy of the visiblecoded primitives; then, six-dimensional information of X, Y, Z, pitch,roll and yaw of the machine tool interpolation contour represented bythe reference primitive in machine tool coordinate system is obtainedthrough datum transformation; the method is used to traverse each shotframe image to obtain the final actual six-dimensional motion contour ofthe machine tool; a six-dimensional contouring error generated by thecomputer numerical control (CNC) machine tool interpolation is computedby comparing the measured contour with the nominal one; specific stepsof the method are as follows: first step: installing the measurementfixture and the measurement system which are specially made themeasurement fixture specially made is composed of a base (10), ahigh-brightness short-time light-emitting unit (9), a priori standardplate (7) and coded primitives (8); the priori standard plate (7) ismade of transparent base material, and the coded primitives (8) withunique code values and matrice distribution are coated on the prioristandard plate (7); when the measurement fixture is installed, thehigh-brightness short-time light-emitting unit (9) is inserted intogrooves on both sides of the base (10); the priori standard plate (7) issupported on the base (10); the priori standard plate (7) is pressed bytwo pressing plates (6); four pressing plate locking bolts (5) are usedto press and fix the priori standard plate (7) through the pressingplates (6); the measurement system comprises a camera (1), a cameraclamp (2) and the measurement fixture; the camera (1) is fixed to thecamera clamp (2); the camera clamp (2) is installed above themeasurement fixture to collect sequential images in the motion processof the measurement fixture; the assembled measurement fixture is put onan optical three-coordinate device platform; an optical three-coordinatedevice calibrates a space geometry relation among the coded primitives(8) under a global coordinate system of the priori standard plate; whenthe measurement system is arranged, the calibrated measurement fixtureis fastened to a rotary table (3) of the computer numerical control(CNC) machine tool (4) through a pressing bolt (11) and a pressing nut(12); second step: establishing the global coordinate system of thepriori standard plate the global coordinate system O_(G)X_(G)Y_(G)Z_(G)(14) of the priori standard plate is established on the measurementfixture; an origin is established on the center of the coded primitive(8) in the first row and the first column, and is defined as O_(G); thedirection of the X_(G) coordinate axis is that the origin O_(G)downwards points to the center point of the coded primitive (8) in thefirst column and the last row on the array; the direction of the Y_(G)coordinate axis is that the O_(G) points towards the right to the centerpoint of the coded primitive (8) in the first row and the last column onthe array; the Z_(G) coordinate axis is determined by a right-handedrule; the optical three-coordinate device is used to calibrate the spacegeometry relation among the coded primitives (8) under the globalcoordinate system O_(G)X_(G)Y_(G)Z_(G) (14) of the priori standard plateto obtain three-dimensional coordinates of the coded primitives (8)under the global coordinate system O_(G)X_(G)Y_(G)Z_(G) (14) of thepriori standard plate; the coded primitives (8) on the priori standardplate (7) carry motion information of the computer numerical control(CNC) machine tool (4); the spatial position relationship among thecoded primitives (8) is calibrated through a high-accuracy device; onthe premise of ensuring calibration accuracy, the size of the prioristandard plate (7) can be made as large as possible to satisfylarge-scale measurement demands of the contouring error; third step:camera calibration a camera imaging model expresses a one-to-one mappingrelationship between a camera coordinate system and a world coordinatesystem; the camera imaging model with distortion parameters is:$\begin{matrix}{{Z_{c}\begin{bmatrix}{u + \delta_{x}} \\{v + \delta_{y}} \\1\end{bmatrix}} = {{{\begin{bmatrix}C_{x} & 0 & u_{0} \\0 & C_{y} & v_{0} \\0 & 0 & 1\end{bmatrix}\begin{bmatrix}R_{C}^{I} & T_{C}^{I} \\0^{T} & 1\end{bmatrix}}\begin{bmatrix}X_{w} \\Y_{w} \\Z_{w} \\1\end{bmatrix}} = {K \cdot T \cdot \begin{bmatrix}X_{w} \\Y_{w} \\Z_{w} \\1\end{bmatrix}}}} & (1)\end{matrix}$ where (X_(w),Y_(w),Z_(w)) is a three-dimensionalcoordinate of the center point of the coded primitive (8) under theworld coordinate system; K is an intrinsic matrix of the camera (1); Tis an extrinsic matrix of the camera (1); (u,v) is a two-dimensionalcoordinate of the center point of the coded primitive (8) in an imageplane; (u₀,v₀) is coordinate of the principal point; (C_(x),C_(y)) is anequivalent focal length in transverse and longitudinal direction; R_(C)^(I) and T_(C) ^(I) are respectively rotation and translationtransformation matrixes between the camera coordinate system and theworld coordinate system; (δ_(x),δ_(y)) is a distortion of an image pointin the directions of x and y caused by an imperfect optical system;checker calibration boards is placed in multiple positions in the fieldof view (21) of the camera (1) and the images are acquired; distortionparameters as well as the intrinsic and extrinsic matrixes of the camera(1) are calibrated through a calibration algorithm proposed by ZhengyouZhang, “A flexible new technique for camera calibration,” in IEEETransactions on Pattern Analysis and Machine Intelligence, vol. 22, no.11, pp. 1330-1334, November 2000, doi: 10.1109/34.888718 (Year: 2000);fourth step: high-definition no-fuzzy image collection and processingfor high-dynamic and large-range interpolation contour of computernumerical control (CNC) machine tool on the basis of completing theinstallation and arrangement of the measurement fixture, images of thecontour interpolated by the computer numerical control (CNC) machinetool (4) are collected; because requirements for the measurementaccuracy of the contouring error are high, the required field of view(21) for shooting is small; firstly, the parameters of the camera (1)are adjusted so that the camera (1) is under the optimal shooting fieldof view and frame frequency; subsequently, the camera (1) and thehigh-brightness short-time light-emitting unit (9) are synchronouslytriggered; light-emitting time and light-emitting intensity of thehigh-brightness short-time light-emitting unit (9) are set to ensurethat the high-brightness short-time light-emitting unit (9) penetratesthrough the base of the priori standard plate (7) within the exposingtime of the camera (1) and supplements light for the coded primitives(8); high-traverse speed machine tool speed which can reflect dynamicperformance of the machine tool is selected; each motion axis of thecomputer numerical control (CNC) machine tool (4) is driven tointerpolate the contour in accordance with the program instructions; inthe process of image collection of the machine tool movement, the camera(1) is fixed and the machine tool moves; clear and no-fuzzy sequentialimages of the coded primitives (8) are collected under the assistance ofthe high-brightness short-time light-emitting unit (9); after the imagesare collected, the code values represented by each coded primitive (8)on the images are recognized, then the two-dimensional pixel coordinatesof the center point of each decoded coded primitive (8) is positionedthrough a gray centroid method; the center of coded primitives ispositioned by an extraction algorithm of the gray centroid method, witha computation expression as follows: $\begin{matrix}\left\{ \begin{matrix}{x = \frac{\sum\limits_{i = m}^{m}{\sum\limits_{j = 1}^{n}{i \times {f\left( {i,j} \right)}}}}{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{f\left( {i,j} \right)}}}} \\{y = \frac{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{j \times {f\left( {i,j} \right)}}}}{\sum\limits_{i = 1}^{m}{\sum\limits_{j = 1}^{n}{i \times {f\left( {i,j} \right)}}}}}\end{matrix} \right. & (2)\end{matrix}$ where (i, j) represents the pixel point in image plane; mand n are the number of pixels included in the image in the transversedirection and the longitudinal direction; (x, y) is a center-of-masscoordinate of the image; f(i, j) is a gray value at the pixel coordinate(i, j); fifth step: six-dimensional computation for high-dynamic andlarge-range arbitrary contouring error of computer numerical control(CNC) machine tool in the method, a small field of view (21) is used toenhance the measurement accuracy of the coded primitives (8) in thefield of view; in combination with priori knowledge, the monocularvision pose algorithm is used to promote vision measurable dimension andrange of interpolation contouring errors of machines; the whole machinetool motion contour is represented by a selected reference primitive;the position of the reference primitive in an invisible region of thefield of view (21) is computed by the pixel coordinates of theprimitives in visible region in combination with high-accuracy prioriconstraints; the motion contour represented by the reference primitivein the machine tool coordinate system is obtained through datumtransformation by traversing all the images; a six-dimensionalcontouring error generated by the interpolation of the computernumerical control (CNC) machine tool (4) is computed by comparing themeasured contour with the nominal one; six-dimensional computation stepsfor high-dynamic and large-range arbitrary contouring error of computernumerical control (CNC) machine tool are specifically as follows: thefield of view (21) of the camera (1) is N×N (unit: mm); the externaldimension of the priori standard plate (7) is M×M (unit: mm); N is muchsmaller than M; besides the above global coordinate systemO_(G)-X_(G)Y_(G)Z_(G) (14) of the priori standard plate, involvedcoordinate systems also comprise a camera coordinate systemO_(C)-X_(C)Y_(C)Z_(C) (13), a machine tool coordinate systemO_(M)-X_(M)X_(M)Y_(M)Z_(M)(15) and a local coordinate systemO_(Li)-X_(Li)Y_(Li)Z_(Li) (22) of the priori standard plate; the originof the camera coordinate system O_(C)-X_(C)Y_(C)Z_(C) (13) isestablished on an optical center O_(C); when the computer numericalcontrol (CNC) machine tool (4) does not move, four coded primitives P₁ ¹16, P₁ ² 17, P₁ ³ 18 and P₁ ⁴ 19 arranged in a rectangle in the field ofview are selected in the first frame image; the coded primitive P₁ ¹ 16is selected as a reference primitive; the motion contour of the computernumerical control (CNC) machine tool (4) synthesized by theinterpolation motion axis of each axis is represented by the codedprimitive P₁ ¹ 16; the coordinate in the global coordinate systemO_(G)-X_(G)Y_(G)Z_(G) (14) of the priori standard plate is ^(G)P₁¹(^(G)X₁ ¹, ^(G)Y₁ ¹, ^(G)Z₁ ¹); the machine tool coordinate systemO_(M)-X_(M)Y_(M)Z_(M) (15) is established by taking P₁ ¹ 16 as anorigin; the direction of each coordinate axis of the machine toolcoordinate system O_(M)-X_(M)Y_(M)Z_(M) (15) is consistent with thedirection of each motion axis of the computer numerical control (CNC)machine tool (4); the machine tool is controlled to drive themeasurement fixture to respectively move along the X axis direction ofthe machine tool to multiple positions; the three-dimensional coordinate(x,y,z) of P₁ ¹ 16 relative to the camera coordinate systemO_(C)-X_(C)Y_(C)Z_(C) (13) in each position is computed using amonocular vision pose solving algorithm; on this basis, a vector in theX axis direction is fitted; the Y axis of the machine tool coordinatesystem O_(M)-X_(M)Y_(M)Z_(M) (15) is determined in accordance with thesame rule; the Z axis of the machine tool coordinate systemO_(M)-X_(M)Y_(M)Z_(M) (15) is determined by the right-handed rule; Xaxis and Y axis are established in accordance with the followingformula: $\begin{matrix}\left\{ \begin{matrix}{\frac{x - {{}_{}^{}{}_{}^{}}}{m_{x}} = {\frac{y - {{}_{}^{}{}_{}^{}}}{n_{x}} = \frac{z - {{}_{}^{}{}_{}^{}}}{p_{x}}}} \\{\frac{x^{\prime} - {{}_{}^{}{}_{}^{}}}{m_{y}} = {\frac{y^{\prime} - {{}_{}^{}{}_{}^{}}}{n_{y}} = \frac{z^{\prime} - {{}_{}^{}{}_{}^{}}}{p_{y}}}} \\{\begin{pmatrix}{\,^{M}X} \\{\,^{M}Y} \\{\,^{M}Z} \\1\end{pmatrix} = {M_{C}^{M}\begin{pmatrix}{\,^{C}X} \\{\,^{C}Y} \\{\,^{C}Z} \\1\end{pmatrix}}}\end{matrix} \right. & (3)\end{matrix}$ where ^(C)P₁ ¹(^(C)X₁ ¹, ^(C)Y₁ ¹, ^(C)Z₁ ¹) is thethree-dimensional coordinates of the coded primitive P₁ ¹ 16 in thecamera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13) in the first frameimage; (x′,y′,z′) is the three-dimensional coordinates of point P₁ ¹ 16relative to the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) 13 in eachposition computed using the monocular vision pose solving algorithm bythe measurement fixture that moves along the X axis direction of themachine tool to multiple positions; (m_(x),n_(x),p_(x)) is a vector inthe X axis direction of the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) (15); (m_(y),n_(y),p_(y)) is a vector in the Y axisdirection of the machine tool coordinate system O_(M)X_(M)Y_(M)Z_(M)(15); (^(C)X, ^(C)Y, ^(C)Z) is a three-dimensional coordinates of apoint in the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13); (^(M)X,^(M)Y, ^(M)Z) is a three-dimensional coordinates of a point in themachine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) (15); M_(C) ^(M) isa transformation matrix between the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) 13 and the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) (15); during measurement, the priori standard plate(7) continuously makes interpolation motion along with the machine tool,and the coded primitives (8) thereon are continuously imaged on thecamera (1); in the motion process of the computer numerical control(CNC) machine tool (4), the camera (1) collects G frame images totally;four coded primitives (8) that appears in the field of view in the ithframe image and arranged in a rectangle are P_(i) ¹ 23, P_(i) ² 24,P_(i) ³ 25 and P_(i) ⁴ 26; the coordinates of the centers of the fourcoded primitives (8) in the global coordinate systemO_(G)X_(G)Y_(G)Z_(G) (14) of the priori standard plate are ^(G)P_(i)¹(^(G)X_(i) ¹, ^(G)Y_(i) ¹, ^(G)Z_(i) ¹), ^(G)P_(i) ²(^(G)X_(i) ²,^(G)Y_(i) ², ^(G)Z_(i) ²), ^(G)P_(i) ³(^(G)X_(i) ³, ^(G)Y_(i) ³,^(G)Z_(i) ³) and ^(G)P_(i) ⁴(^(G)X_(i) ⁴, ^(G)Y_(i) ⁴, ^(G)Z_(i) ⁴);corresponding two-dimensional pixel coordinates on the image plane arep_(i) ¹(u_(i) ¹,v_(i) ¹), p_(i) ²(u_(i) ²,v_(i) ²), p_(i) ³(u_(i)³,v_(i) ³) and p_(i) ⁴(u_(i) ⁴,v_(i) ⁴); a local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) (22), (i=1, 2 . . . G) of the priori standardplate under the ith frame is established; the coordinate system takesP_(i) ¹ 23 as a coordinate origin; XL, and YL, coordinate axisdirections are respectively parallel to X_(G) and Y_(G) directions ofthe global coordinate system O_(G)X_(G)Y_(G)Z_(G) 14 of the prioristandard plate; Z_(Li) coordinate axis is determined by the right-handedrule; three-dimensional coordinates of the centers of the selected fourcoded primitives (8) in the local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) (22) of the priori standard plate are:$\begin{matrix}\left\{ \begin{matrix}{{\begin{pmatrix}{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\1\end{pmatrix} = {{\begin{pmatrix}I & T_{i}^{T} \\0 & 1\end{pmatrix}\begin{pmatrix}{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\{{}_{}^{}{}_{}^{}} \\1\end{pmatrix}m} = 1}},2,3,4} \\{T_{i} = \left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)}\end{matrix} \right. & (4)\end{matrix}$ where T_(i) is a transformation matrix between the globalcoordinate system O_(G)X_(G)Y_(G)Z_(G) (14) of the priori standard plateof the ith frame image and the local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) (22) of the priori standard plate; the ithframe image (i=1, 2 . . . G) is computed as follows: $\begin{matrix}\left\{ \begin{matrix}{{Y_{i}^{2} + Z_{i}^{2} - {2Y_{i}Z_{i}\cos\;\alpha}} = a^{\prime 2}} \\{{X_{i}^{2} + Z_{i}^{2} - {2X_{i}Z_{i}\cos\;\beta}} = b^{\prime 2}} \\{{X_{i}^{2} + Y_{i}^{2} - {2X_{i}Y_{i}\cos\;\gamma}} = c^{\prime\; 2}}\end{matrix} \right. & (5)\end{matrix}$ where X_(i) is a distance from the optical center O_(C) inthe camera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13) to the P_(i) ¹ 23point on the priori standard plate (7) of the ith frame; Y_(i) is adistance from the optical center O_(C) in the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) (13) to the P_(i) ² 24 point on the priori standardplate 7 of the ith frame; Z_(i) is a distance from the optical centerO_(C) in the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13) to theP_(i) ⁴ 26 point on the priori standard plate 7 of the ith frame; a′ isa distance between P_(i) ¹ 23 and P_(i) ² 24 in the global coordinatesystem O_(G)X_(G)Y_(G)Z_(G) of the priori standard plate (7) of the ithframe; a′ is a distance between P_(i) ² 24 and P_(i) ⁴ 26 in the globalcoordinate system O_(G)X_(G)Y_(G)Z_(G) (14) of the priori standard plateof the ith frame; c′ is a distance between P_(i) ¹ 23 and P_(i) ⁴ 26 inthe global coordinate system O_(G)X_(G)Y_(G)Z_(G) (14) of the prioristandard plate of the ith frame; α is an angle ∠P_(i) ²O_(C)P_(i) ⁴between straight lines O_(C)P_(i) ² and O_(C)P_(i) ⁴; β is an angle∠P_(i) ²O_(C)P_(i) ⁴ between straight lines O_(C)P_(i) ¹ and O_(C)P_(i)⁴; γ is an angle ∠P_(i) ¹O_(C)P_(i) ² between straight lines O_(C)P_(i)¹ and O_(C)P_(i) ²;${{\cos\;\alpha} = {{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{4} - u_{0}}{C_{x}\;} \right)^{2} + \left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)^{2\;}}}},{{\cos\;\gamma} = {{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{2} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{2} - u_{0}}{C_{x}\;} \right)^{2} + \left( \frac{v_{i}^{2} - v_{0}}{C_{y}} \right)^{2\;}}}},{{{\cos\;\beta} = {{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)\left( \frac{u_{i}^{4} - u_{0}}{C_{x}} \right)} + {\left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right){\left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)/\sqrt{\left( \frac{u_{i}^{1} - u_{0}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1} - v_{0}}{C_{y}} \right)^{2}}}} + \sqrt{\left( \frac{u_{i}^{4} - u_{0}}{C_{x}\;} \right)^{2} + \left( \frac{v_{i}^{4} - v_{0}}{C_{y}} \right)^{2\;}}}};}$k=2 cos α, q=2 cos β, r=2 cos γ, c′²=vZ_(i) ², a′²=ac′²=avZ_(i) ²,b′²=bc′²=bvZ², X_(i)=xZ_(i), Y_(i)=bZ_(i), P_(i) ¹ 23, P_(i) ² 24 andP_(i) ⁴ 26 are set as three spatial points in the ith frame that are notcoplanar and whose position relation is known, and k²+q²+r²−kqr−1≠0 issatisfied; equation (5) is rewritten as formula (6); $\begin{matrix}\left\{ \begin{matrix}{{{\left( {1 - a} \right)y^{2}} - {ax}^{2} + {axyr} - {yk} + 1} = 0} \\{{{\left( {1 - b} \right)x^{2}} - {by}^{2} + {bxyr} - {xq} + 1} = 0}\end{matrix} \right. & (6)\end{matrix}$ the degenerate solution of the formula (6) is eliminatedthrough an optimization algorithm to obtain four acceptable zerosolutions; P_(i) ³ 25 is used as a priori constraint to obtain uniquesolutions of X_(i), Y_(i) and Z_(i); then three-dimensional coordinates^(C)P_(i) ¹(^(C)X_(i) ¹, ^(C)Y_(i) ¹, ^(C)Z_(i) ¹), ^(C)P_(i)²(^(C)X_(i) ², ^(C)Y_(i) ², ^(C)Z_(i) ²) and ^(C)P_(i) ⁴(^(C)X_(i) ⁴,^(C)Y_(i) ⁴, ^(C)Z_(i) ⁴) of P_(i) ¹ 23, P_(i) ² 24 and P_(i) ⁴ 26points on the priori standard plate (7) of the ith frame under thecamera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13) are expressed as thefollowing formula: $\begin{matrix}\left\{ \begin{matrix}{{{}_{}^{}{}_{}^{}} = {\frac{u_{i}^{1}}{C_{x}} \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}} \\{{{}_{}^{}{}_{}^{}} = {\frac{v_{i}^{1}}{C_{y}} \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}} \\{{{}_{}^{}{}_{}^{}} = {1 \cdot {{{O_{C}P_{i}^{j}}}/\sqrt{\left( \frac{u_{i}^{1}}{C_{x}} \right)^{2} + \left( \frac{v_{i}^{1}}{C_{y}} \right)^{2} + 1}}}}\end{matrix} \right. & (7) \\{{j = 1},2,{4;{i = 1}},{{2\mspace{14mu}\ldots\mspace{14mu} G};}} & \;\end{matrix}$ on the basis of the known ^(Li)P_(i) ^(j)(^(Li)X_(i) ^(j),^(Li)Y_(i) ^(j), ^(Li)Z_(i) ^(j)) and ^(C)P_(i) ^(j)(^(C)X_(i) ^(j),^(C)Y_(i) ^(j), ^(C)Z_(i) ^(j), a Kabsch algorithm is used for solving arotation matrix R_(i)′ and a translation matrix t_(i)′ of the localcoordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) 22 of the priori standardplate of the ith frame relative to the camera coordinate systemO_(C)-X_(C)Y_(C)Z_(C) (13); t_(i)′ is the three-dimensional coordinatest_(i)′=^(C)P_(i) ¹(^(C)X_(i) ¹, ^(C), Y_(i) ¹, ^(C)Z_(i) ¹) of theorigin P_(i) ¹ 23 of the local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) (22) of the priori standard plate of the ithframe in the camera coordinate system O_(C)X_(C)Y_(C)Z_(C) (13); a pitchangle θ_(i)′, a roll angle Φ_(i)′ and a yaw angle ψ_(i)′ between twocoordinate systems are computed through R_(i)′ separation: thethree-dimensional coordinates (, , );$\left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)^{T} = {\begin{pmatrix}R_{i}^{\prime} & t_{i}^{\prime\; T} \\0 & 1\end{pmatrix}\begin{pmatrix}I & T_{i}^{T} \\0 & 1\end{pmatrix}\left( {{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}},{{}_{}^{}{}_{}^{}}} \right)^{T}}$of the reference primitive P₁ ¹ in the camera coordinate systemO_(C)X_(C)Y_(C)Z_(C) (13) of the ith frame is computed according to aknown spatial constraint among the coded primitives (8) of the prioristandard plate (⁷); the measured contouring error is represented in themachine tool coordinate system O_(M)X_(M)Y_(M)Z_(M) 15, and the contourmeasured by the camera (1) needs to be subjected to coordinatetransformation to correctly compute the machine tool contouring error; apose transformation formula of the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) (15) and the local coordinate systemO_(Li)X_(Li)Y_(Li)Z_(Li) (22) of the priori standard plate is:$\begin{matrix}{{M_{i} = {M_{C}^{M}\begin{pmatrix}R_{i}^{\prime} & t_{i}^{\prime\; T} \\0 & 1\end{pmatrix}}},} & (8)\end{matrix}$ where M_(i) is a transformation matrix between the localcoordinate system O_(Li)X_(Li)Y_(Li)Z_(Li) (22) of the priori standardplate under the ith frame image and the machine tool coordinate systemO_(M)X_(M)Y_(M)Z_(M) (15); a pitch angle θ_(i), a roll angle Φ_(i) and ayaw angle ψ_(i) of the ith frame standard plate relative to the machinetool coordinate system O_(M)X_(M)Y_(M)Z_(M) (15) are separated fromM_(i), all image sequences are traversed to obtain asix-degree-of-freedom contour L_(r) of the whole machine toolrepresented by the reference primitive, where L_(r)(^(M)X_(i),^(M)Y_(i), ^(M)Z_(i), θ_(i), Φ_(i), ψ_(i)) and i=1, 2 . . . G; asix-degree-of-freedom contouring error E generated by interpolation ofthe computer numerical control (CNC) machine tool (4) is computed bycomparing the actual six-degree-of-freedom contour L_(r) with thenominal contour L_(m):E=L _(r) −L _(m)  (9).